import requests
from bs4 import BeautifulSoup
import re

url = 'https://i.youku.com/i/UNDE1OTA1OTg5Ng==/videos'


def get_video_list(url):

    header = {"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36"}

    response = requests.get(url, headers=header)

    bs = BeautifulSoup(response.content, "html.parser")

    items = bs.findAll('a', attrs={"target": "video", "href": re.compile('//v.youku.com/v_show/id_(.*).html')})
    for item in items:
        print('https' + item.get('href'), item.get('title'))

